<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>画图形</title>
    <style>
        .sanjiaoxing {
            width: 0px;
            height: 0px;
            /* border:50px solid #000; */
            border-top: 50px solid transparent;
            border-right: 0px solid #eeeeee;
            border-bottom: 50px solid transparent;
            border-left: 50px solid #0f0;
            /* 向下的三角 */
            /* border-top: 50px solid #f00;
    border-right: 50px solid transparent;
    border-bottom: 0px solid transparent;
    border-left: 50px solid transparent; */
            margin: 20px auto;
        }

        .dialog {
            margin: 50px auto;
            width: 300px;
            height: 25px;
            line-height: 25px;
            text-align: center;
            padding: 10px;
            border-radius: 10px;
            background-color: #6a6;
            position: relative;
        }

        .dialog::before {
            position: absolute;
            left: -9px;
            content: "";
            /* //相反的，三角向左，就设置border-right的颜色 */
            border-right: 10px solid #6a6;
            border-top: 10px solid transparent;
            border-bottom: 10px solid transparent;
            border-left: 0px solid transparent;
        }

        .diamond {
            width: 100px;
            height: 100px;
            margin: 10px auto;
            border: 1px solid #060;
            /* transform 3d转化，rotate 旋转，deg度 */
            transform: rotate(45deg);
        }

        .parallel {
            width: 100px;
            height: 100px;
            margin: 50px auto;
            border: 1px solid #000;
            /* transform 3d转化，skew 倾斜，deg度 */
            transform: skew(25deg);
        }

        .star {
            margin: 20px auto;
            width: 0px;
            height: 0px;
            border-bottom: 100px solid #ff0000;
            border-left: 50px solid transparent;
            border-right: 50px solid transparent;
            border-top: 0px solid transparent;
            position: relative;
        }

        /* 思路：两个三角（一个正，一个反，第二个利用伪元素），然后定位 */
        .star::after {
            position: relative;
            top: 126px;
            left: -53px;
            content: "";
            border-top: 100px solid #ff0000;
            border-left: 50px solid transparent;
            border-right: 50px solid transparent;
            border-bottom: 0px solid transparent;
        }

        .taiji-wrap {
            background-color: #f2f2f2;
            margin: 15px auto;
        }

        .taiji {
            /* //外侧的对半圆利用border-left宽度，颜色实现 */
            margin: 0 auto;
            width: 150px;
            height: 300px;
            border-radius: 50%;
            border-left: 150px solid #000000;
            background-color: #fff;
            position: relative;
        }

        .taiji::before {
            /* 黑心圆   利用padding ,border设置宽度，外侧颜色 黑色，背景白色 */
            position: absolute;
            left: -75px;
            top: 0px;
            content: "";
            width: 0px;
            height: 0px;
            padding: 25px;
            border: 50px solid #000;
            border-radius: 50%;
            background-color: #fff;
        }

        .taiji::after {
            position: absolute;
            left: -75px;
            bottom: 0px;
            content: "";
            width: 0px;
            height: 0px;
            padding: 25px;
            border: 50px solid #ffffff;
            border-radius: 50%;
            background-color: #000000;
        }
    </style>
</head>

<body>
    <!-- 三角形 -->
    <div class="sanjiaoxing"></div>
    <!-- 对话框 -->
    <div class="dialog">hello word</div>
    <!-- 菱形，平行四边形 -->
    <div class="diamond"></div>
    <div class="parallel"></div>
    <!-- 六角星 -->
    <div class="star"></div>
    <div class="taiji-wrap">
        <div class="taiji"></div>
    </div>
</body>

</html>